package org.example.mytask.controller;

import org.example.mytask.domain.PurchasingPlanReview;
import org.example.mytask.service.PurchasingPlanReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/mytask/purchasingPlan")
public class PurchasingPlanReviewController {
    @Autowired
    private PurchasingPlanReviewService purchasingPlanReviewService;

    @GetMapping("/list")
    public List<PurchasingPlanReview> selectAll(@RequestBody PurchasingPlanReview purchasingPlanReview){
        return purchasingPlanReviewService.selAll(purchasingPlanReview);
    }
    /**
     * 查询采购计划审核
     */
    @GetMapping("/{id}")
    public PurchasingPlanReview selectById(@PathVariable int id) {
        return purchasingPlanReviewService.selById(id);
    }
    /**
     * 修改采购计划审核
     */
    @PutMapping
    public int updateP(@RequestBody PurchasingPlanReview purchasingPlanReview) {
        return purchasingPlanReviewService.updateP(purchasingPlanReview);
    }

}























